package es.unileon.prg2.censo.handler;

/**
 * @author Manuel Molinos Crespo, Adrian Campazas Vega, Alberto Castro Delgado, Pedro Alvarez Alvarez, Adrian Cabello Galvan, Jose Alvaro Fernandez Alvarez
 *
 */

public class LongName implements Handler{
	
private String id;
	
	/**
	 * Constructor used for created the ID of the components without restrictions.
	 * @param id String composite for all type of characters and undefined size
	 */
	public LongName (String id){
		this.id = id;
	}

	/**
	 * Other constructor used for created the ID of the components without restrictions from a Handler parameter.
	 * @param id Handler composite for all type of characters and undefined size
	 */
	public LongName(Handler id){
		this.id = id.toString();
	}
		
	@Override
	public int compareTo(Handler another) {
		return this.id.compareTo(another.toString());
	}
	
	public String toString(){
		return this.id;
	}

}
